#ifndef __PLAYER_H__
#define __PLAYER_H__

#include "cocos2d.h"
#include "AvoidBlock.h"

enum player_move_type
{
	PLAYER_MOVE_TYPE_NONE = 0,
	PLAYER_MOVE_TYPE_STOP,
	PLAYER_MOVE_TYPE_LEFT,
	PLAYER_MOVE_TYPE_RIGHT,
	PLAYER_MOVE_TYPE_MAX,
};

class Player : public CCNode
{
public:
    Player();
	static CCSprite * createPlayer(void);
	
    int _fCreditCount;
    int _totalCredit;
    void setPosition(CCPoint);
    CCPoint position();

	void move(enum player_move_type type);
	void update(float dt);
    
    CCRect boundingBox();
    void setBlock(int blockType);
    void breakdown();
private:
    CCSize _size;
	CCPoint _velocity;
    CCSprite* _pBody;
    CCSprite* _collisionBox;
    
    bool init(void);
    
};

#endif  // __PLAYER_H__